package uk.gov.swmprobation.cpvisibility;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.MenuItem;
import android.view.Window;

public class MyActivity extends Activity {
	
	public static SharedPreferences sharedPref;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
	}
	@Override
	protected void onResume(){
		super.onResume();
		sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
	}
	
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle item selection
        switch (item.getItemId()) {
            case R.id.menu_settings:
            	startActivity(new Intent(this, SettingsActivity.class));
                return true;
            case R.id.go_home:
            	startActivity(new Intent(this,MainActivity.class));
            	return true;
            default:
                return super.onOptionsItemSelected(item);
        }
    }
}
